package com.bailian.system.domain.vo;

import com.bailian.system.domain.BlNews;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.bailian.common.annotation.Excel;
import com.bailian.common.core.domain.BaseEntity;
import com.bailian.system.domain.BlMyFavorite;

/**
 * 我的收藏视图对象 bl_my_favorite
 * 
 * @author bailian
 * @date 2025-01-27
 */
public class BlMyFavoriteVo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 收藏ID */
    private Long favoriteId;

    /** 内容ID */
    @Excel(name = "内容ID")
    private Long contentId;

    /** 内容类型 0 新闻 1仓库 2园区 */
    @Excel(name = "内容类型", readConverterExp = "0=新闻,1=仓库,2=园区")
    private Integer contentType;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 收藏状态 */
    @Excel(name = "收藏状态")
    private String status;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 说明 */
    @Excel(name = "说明")
    private String desc;

    @Excel(name = "说明")
    private BlParkVo park;

    @Excel(name = "说明")
    private BLWareHouseVo warehouse;

    @Excel(name = "说明")
    private BlNews news;

    // ========== 构造函数 ==========
    
    public BlMyFavoriteVo() {}
    
    public BlMyFavoriteVo(BlMyFavorite favorite) {
        if (favorite != null) {
            this.favoriteId = favorite.getFavoriteId();
            this.contentId = favorite.getContentId();
            this.contentType = favorite.getContentType();
            this.userId = favorite.getUserId();
            this.status = favorite.getStatus();
            this.title = favorite.getTitle();
            this.desc = favorite.getDesc();
            // 使用setter方法设置BaseEntity的字段
            this.setCreateTime(favorite.getCreateTime());
            this.setUpdateTime(favorite.getUpdateTime());
        }
    }

    // ========== Getter和Setter方法 ==========
    
    public void setFavoriteId(Long favoriteId) 
    {
        this.favoriteId = favoriteId;
    }

    public Long getFavoriteId() 
    {
        return favoriteId;
    }

    public void setContentId(Long contentId) 
    {
        this.contentId = contentId;
    }

    public Long getContentId() 
    {
        return contentId;
    }

    public void setContentType(Integer contentType) 
    {
        this.contentType = contentType;
    }

    public Integer getContentType() 
    {
        return contentType;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setDesc(String desc) 
    {
        this.desc = desc;
    }

    public String getDesc() 
    {
        return desc;
    }

    public void setPark(BlParkVo park) 
    {
        this.park = park;
    }
    public BlParkVo getPark() 
    {
        return park;
    }

    public void setWarehouse(BLWareHouseVo warehouse)
    {
        this.warehouse = warehouse;
    }
    public BLWareHouseVo getWarehouse()
    {
        return warehouse;
    }

    public void setNews(BlNews news)
    {
        this.news = news;
    }
    public BlNews getNews()
    {
        return news;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("favoriteId", getFavoriteId())
            .append("contentId", getContentId())
            .append("contentType", getContentType())
            .append("userId", getUserId())
            .append("status", getStatus())
            .append("title", getTitle())
            .append("desc", getDesc())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
